EchoSIOInt.asm
Language: 8080 Assembly
Last Modified: 2022-11-14 1:09:26 AM UTC
File Size: 933 bytes
Last Modified: 2022-11-14 1:09:26 AM UTC
File Size: 933 bytes
http://www.penguinstew.ca/example/AltairSerialEcho/EchoSIOInt.asm
; Echo SIO with interupts
ORG 0000H
LXI SP, 0100H ; 0000: 31 00 01 Initalize stack pointer
MVI A, 01H ; 0003: 3E 01
OUT 00H ; 0005: D3 00 Enable SIO input interupt
EI ; 0007: FB Enable CPU interupts
LOOP: NOP ; 0008: 00
NOP ; 0009: 00
NOP ; 000A: 00
JMP LOOP ; 000B: C3 08 00 Program loop
ORG 0038H ; Interupt Handler
PUSH A ; 0038: F5 Save value of accumulator and PSW
IN 01H ; 0039: DB 01
OUT 01H ; 003B: D3 01 Echo value
POP A ; 003D: F1 Restore accumulator and PSW
EI ; 003E: FB Renable interupts
RET ; 003F: C9 return
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17